﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SharpCmd.Dialogs.PanelActions
{
    public partial class RenameSingleFile : Form
    {
        public RenameSingleFile()
        {
            InitializeComponent();
            DialogResult = DialogResult.Cancel;
        }

        public string OriginalFullName { get; set; }
        public string ItemName
        {
            get { return textBox1.Text; }
            set { textBox1.Text = value; }
        }

        private void textBox1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                DialogResult = DialogResult.OK;
                Close();
            }
        }
    }
}
